<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>类别管理</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/css/bootstrap.min.css" />
<script src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
</head>
<body>
	<!-- 头部信息 -->
	<jsp:include page="header.jsp"></jsp:include>

	<!-- 搜索区 -->
	<jsp:include page="category-search.jsp"></jsp:include>

	<!-- 内容区域 -->
	<div class="container-fluid" style="margin: 30px;">
		<div
			style="border: 1px solid gray; border-radius: 8px; height: 500px;">
			<!-- 类别详情(编辑商品) -->
			<div>
				<h3 style="text-align: center;">编辑类别</h3>
				<form class="form-inline" action="${pageContext.request.contextPath}/category/update.do" method="POST">
					<div class="form-group col-xs-5 col-xs-offset-1"
						style="margin-top: 20px;">
						<label>类别id</label> 
						<input type="text" class="form-control"
							readonly style="widows: 300px;" name="categoryId" value="${category.categoryId}">
					</div>

					<div class="form-group col-xs-5 col-xs-offset-1"
						style="margin-top: 20px;">
						<label>类别名称</label> <input type="text" class="form-control"
							value="${category.categoryName}" name="categoryName" style="widows: 300px;">
					</div>

					<div class="form-group col-xs-5 col-xs-offset-1"
						style="margin-top: 20px;">
						<label>类别描述</label>
						<textarea rows="5" cols="50" class="form-control" name="categoryDesc">${category.categoryDesc}</textarea>
					</div>

					<div class="form-group col-xs-5 col-xs-offset-1"
						style="margin-top: 100px;">
						<button type="submit" class="btn btn-primary">更新</button>
						<button type="button" class="btn btn-danger"
							style="margin-left: 20px;"
							onclick="location.href='${pageContext.request.contextPath}/category/delete.do?categoryId=${category.categoryId}'">删除</button>
					</div>
				</form>
			</div>
		</div>
	</div>

</body>
</html>